package com.lagou.ipersistence.mapping;

import java.util.List;

/**
 * 一条可执行的SQL封装
 *
 * @author Yan Jiahong
 * Created on 2020/11/15
 */
public class BoundSql {
    private final String sql;
    private final List<ParameterMapping> parameterMappings;
    private final Object parameterObject;

    public BoundSql(String sql, List<ParameterMapping> parameterMappings, Object parameterObject) {
        this.sql = sql;
        this.parameterMappings = parameterMappings;
        this.parameterObject = parameterObject;
    }

    public String getSql() {
        return sql;
    }

    public List<ParameterMapping> getParameterMappings() {
        return parameterMappings;
    }

    public Object getParameterObject() {
        return parameterObject;
    }

    @Override
    public String toString() {
        return "BoundSql{" +
                "sql='" + sql + '\'' +
                ", parameterMappings=" + parameterMappings +
                ", parameterObject=" + parameterObject +
                '}';
    }
}
